﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void ImgBtnInsert_Click(object sender, ImageClickEventArgs e)
    {
           //插入字符串
           string Bstr = this.LblOldMm.Text.ToString().Trim();
           int i = Convert.ToInt32(this.LblInsertPlace.Text.Trim().ToString());
           string InStr = this.LblInsertStr.Text.ToString().Trim();
           string NewStr = Bstr.Insert(i, InStr);//Insert
           this.LblNewStr.Text = NewStr;
    }
    protected void BtnUpdate_Click(object sender, EventArgs e)
    {
        //填充字符串
        string str = this.LblOldStr.Text;
        //使用PadLeft/PadRight方法填充字符串
        string str1 = str.PadLeft(5, '@');
        string str2 = str.PadRight(5, '@');
        this.LblStrLeft.Text = str1;
        this.LblStrRight.Text = str2;
    }
}
